torque.dialogs['settings'] = {
    isOpen: false,
    open: function() {
        if(!torque.dialogs['settings'].isOpen) {
            torque.dialogs['settings'].isOpen = true;
            alert('Opened dialog.');
        }else{
            alert('Already opened.');
        }
    },
    close: function() {
        if(torque.dialogs['settings'].isOpen) { 
            torque.dialogs['settings'].isOpen = false;
            alert('Dialog closed.');
        }else{
            alert('Not open');
        }
    }
}